<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" isELIgnored="false"%>
<!-- jstl jsp的标签 -->
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><!-- 使用额外的或者自定义标签  prefix-->
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
    String path = request.getContextPath();//取项目名
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";//取协议 主机名 端口
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">
    <!-- 无论实际的相对路径是什么 都重新定义为 项目名下的相对路径 -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Insert title here</title>
    <style type="text/css">
        #tab  tr > td img{ height:60px; width:60px}
    </style>
</head>
<body>
<!-- 为什么写标签能够达到 原始java代码输出的效果 ,背后有java读取到你的文本 利用反射调用方法完成输出
语言 叫做 el表达式
-->

<input id="msg" value="${sessionScope.msg}" type="hidden">
<c:if test="${sessionScope.msg != null}">
    <script type="text/javascript">
        var msg = document.getElementById("msg").value;
        alert(msg);
    </script>
    <c:remove var="msg" scope="session" />
</c:if>
<table id="tab" border="1">
    <tr>
        <th>编号</th>
        <th>姓名</th>

        <th colspan="2">操作</th>
    </tr>
    <c:forEach items="${employees}" var="employee">
        <tr>

            <td>${employee.id}</td>
            <td>${employee.yuangongname}</td>

            <td><a href="controller/student/student?sno=${student.sno}&op=update&reqOrRes=req">修改</a></td>
            <td>删除</td>
        </tr>
    </c:forEach>
</table>
<paging:paging pageSize="${dto.pageInfo.pageSize}"
               href="controller/student/students/page"
               offset="${dto.pageInfo.offset}"
               totalRecords="${dto.pageInfo.totalRecords}" />
<a href="back/student/add.jsp">新增</a>
</body>
